package dwz.common.util;

import java.text.SimpleDateFormat;
import java.util.Date;

public class BuildOrderCode {
	/**
	 * 生成规则
	 * 年月日小时，分钟，秒+0000+用户ID
	 * @param userId
	 * @return
	 */
	public static String buildOrderCode(Integer userId){
		Date date = new Date();
		SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
		String dateString = simpleDateFormat.format(date)+"0000"+userId;
		
		
		return dateString;
	}
	
	public static void main(String[] args) {
		System.out.println(buildOrderCode(12));;
		
		
	}
}
